<?php

class commentaire_model extends CI_Model{
    
    public function __construct(){
        parent::__construct(); 
        $this->load->database();
        
   }
   
   public function getCommentaireByUserId($id){
        $limit=1;
        $offset=0;
        $query = $this->db->get_where("commentaire", array('partenaire_id' => (int)$id));
        
        if ($query->num_rows() > 0) {
            foreach ($query->result() as $row) {
                $data[] = $row;
            }
             return $data;
        }
        else
        {
            return false;
        }
   }
}
?>
